Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint: Use golangci-lint for license check #1157

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

abhinav
Copy link
Collaborator

@abhinav abhinav commented Feb 11, 2024

Instead of a hand-written license header check,
use the goheader linter included in golangci-lint.

Also deletes a stale exclude-rules in golangci.yml
that was copied over from Zap.

Instead of a hand-written license header check,
use the goheader linter included in golangci-lint.

Also deletes a stale exclude-rules in golangci.yml
that was copied over from Zap.
abhinav added a commit to abhinav/dig that referenced this pull request Feb 11, 2024
This PR switches to using golangci-lint to run linters.
staticcheck is included and enabled by default.
We add revive and a few others.
All issues reported by the linters have been fixed.

This also allows the linter to run in parallel with the tests.

License header check has also been moved to golangci-lint,
similarly to uber-go/fx#1157.

Refs uber-go/fx#1150
Refs uber-go/zap#1323
Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4c7a22b) 98.74% compared to head (30d0a89) 98.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1157   +/-   ##
=======================================
  Coverage   98.74%   98.74%           
=======================================
  Files          30       30           
  Lines        2950     2950           
=======================================
  Hits         2913     2913           
  Misses         30       30           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sounds like we accidentally added a typo in the license headers
for these files.
@JacobOaks JacobOaks merged commit ecc5bc7 into uber-go:master Feb 12, 2024
12 checks passed
@abhinav abhinav deleted the golangci-license-int branch February 12, 2024 20:49
JacobOaks pushed a commit to uber-go/dig that referenced this pull request Feb 13, 2024
This PR switches to using golangci-lint to run linters.
staticcheck is included and enabled by default.
We add revive and a few others.
All issues reported by the linters have been fixed.

This also allows the linter to run in parallel with the tests.

License header check has also been moved to golangci-lint,
similarly to uber-go/fx#1157.

Refs uber-go/fx#1150
Refs uber-go/zap#1323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants